/**
 * @author Cator Vee  hi@catorv.com
 */
import env from './env'
import { nop } from '../utils'

const isDev = env.dev

function delegate (name) {
  return isDev ? function () { console[name].apply(console, arguments) } : nop
}

export default {
  debug: delegate('debug'),
  info: delegate('info'),
  warn: delegate('warn'),
  error: delegate('error'),
  trace: delegate('trace')
}
